The present invention relates to an image data composition apparatus for laying an image including a transparent color over a background image.
In recent years, with the development of high-performance car navigation systems and satellite broadcast receivers, image display units employed in these devices perform composition of image data using transparent colors, such as composition of semi-transparent non-rectangular objects or screen display of transparent color menu.
FIG. 12 is a functional block diagram illustrating a conventional image display apparatus for composing a transparent color image with a background image. The image display apparatus comprises an image data composition unit 110, a first image memory 20, a second image memory 30, a digital-to-analog converter 40, a monitor 50, and a controller 180.
The first image memory 20 stores image data 100 to be laid over a background image. The image data 100 possesses a color code which indicates information relating to the color of each pixel, and it is supplied from an external CPU (Central Processing Unit) or the like through a bus. The second image memory 30 stores image data 200 as a background. The image data 200 possesses RGB type color data which indicates information relating to the color of each pixel, and it is supplied from an external CPU or the like through a bus. The controller 180 controls pixel-by-pixel output of the color data or the color code from these image data to the image data composition unit 110. The digital-to-analog converter (DAC) 40 converts digital data output from the image data composition unit 110 to an analog image signal. The monitor 50 displays an image on the basis of this image signal.
The image data composition unit 110 comprises a color table 111, a transparency register 112, a transparency decision unit 115, a selector 113, and a compositor 114. The color table 111 contains color data corresponding to plural color codes, and outputs a color data signal d1 in response to a color code signal c1 obtained from the first image memory 20. The transparency register 112 stores one transparency xcex10.
The transparency decision unit 115 stores the color code of a color to be a transparent color, and outputs a hit signal s only when the color code c1 output from the first image memory 20 is equal to the stored color code. On receipt of the hit signal s, the selector 113 selects the transparency xcex10 stored in the transparency register 112 and outputs it as a transparency signal xcex1. When there is no hit signal s, the selector 113 outputs xe2x80x9c0xe2x80x9d as a transparency signal xcex1. Here, xe2x80x9c0xe2x80x9d means that the transparency is 0, i.e., an opaque color.
FIG. 13 is a block diagram illustrating the transparency decision unit 115 and the selector 113 in more detail. As shown in FIG. 13, the transparency decision unit 115 comprises transparent color registers 1151a and 1151b and comparators 1152a and 1152b. The transparent color registers 1151a and 1151b store the color codes of colors to be transparent colors. The comparators 1152a and 1152b are connected to the color registers 1151a and 1151b, respectively. Each of these comparators outputs a hit signal s only when the color code c1 output from the first image memory 20 is equal to the color code stored in the transparent color register 1151a or 1151b. The selector 113 comprises a tri-state gate 1131a and a tri-state gate 1131b. The tri-state gate 1131a outputs the transparency xcex10 stored in the transparency register 112 on receipt of the hit signal s, and the tri-state gate 1131b outputs xe2x80x9c0xe2x80x9d when there is no hit signal s.
The compositor 114 composites a color data signal d2 which is obtained from the second image data 200 with a color data signal d1 which corresponds to the first image data 100 and is obtained from the color table 111 in accordance with the color code signal c1, pixel by pixel, on the basis of the transparency signal xcex1, and outputs composite image data dm as the result of composition.
Hereinafter, the operation of the image data composition apparatus so constructed will be described. Initially, the color data stored in the second image memory 30 is read by raster scan under control of the controller 180 to be output to the compositor 114 as a color data signal d2. Likewise, the color code signal c1 is output from the first image memory 20 by raster scan, and converted to a color data signal d1 by the color table 111 to be output to the compositor 114.
On the other hand, the color code signal c1 read from the first image memory 20 is also input to the transparency decision unit 115. In the transparency decision unit 115, the color code represented by the color code signal c1 is compared with the color codes stored in the transparent color registers 1151a and 1151b by the comparators 1152a and 1152b, respectively. When it is equal to any of these color codes stored, a hit signal s is output to the selector 113, and when it is equal to none of these color codes, no hit signal is output. When the selector 113 receives the hit signal s, the tri-state gate 1131a outputs the transparency xcex10 which is set in the transparency register 112, as a transparency signal xcex1, to the compositor 114. When no hit signal is input to the selector 113, the tri-state gate 1131b outputs xe2x80x9c0xe2x80x9d as a transparency signal a to the compositor 114. The compositor 114 composes the color data d1 of the first image data and the color data d2 of the second image data, pixel by pixel, in accordance with the transparency signal xcex1, and outputs composite data. The composite data is converted to an analog image signal by the digital-to-analog converter 40, and the analog image signal is sent to the monitor 50 to be displayed as an image.
In the conventional image data composition unit 110 constructed as described above, the transparency decision unit 115 needs transparent color registers and comparators as many as the number of colors to be set as transparent colors. For example, in the conventional composition unit 110, since the transparency decision unit 115 has two transparent color registers 1151a and 1151b and two comparators 1152a and 1152b, two transparent colors can be set. However, when ten transparent colors are desired to be set, ten transparent color registers and ten comparators are required. In this way, the circuit scale increases in proportion to the number of transparent colors to be set. It is possible to perform the above-described comparison process in time division by providing only one comparator for a plurality of transparent color registers. In this case, however, the number of process cycles increases.
The present invention is made to solve the above-described problems, and it is an object of the present invention to provide an image data composition apparatus which can increase the number of settable transparent colors without increasing the circuit scale and the processing cycle.
Other objects and advantages of the invention will become apparent from the detailed description that follows. The detailed description and specific embodiments described are provided only for illustration since various additions and modifications within the scope of the invention will be apparent to those of skill in the art from the detailed description.
According to a first aspect of the present invention, there is provided an image data composition apparatus comprising: a color table in which color data for each of plural color codes is associated with transparency data relating to the transparency of this color data, the color table receiving first image data which has data relating to the color of an image as the color code, and accepting the color code from the first image data, and outputting the color data and the transparency data which correspond to this color code; and a composition unit for receiving second image data having, as color data, information relating to the color of an image, and composing the color data of this second image data with the color data output from the color table in accordance with a transparency which is decided by the transparency data. Accordingly, the number of transparent colors can be increased by only rewriting the transparency data of the color codes to be transparent colors on the color table and, therefore, the circuit scale is not increased to increase the number of transparent colors. Further, since the transparency data corresponding to each color code is directly output from the color table, the processing cycle is not increased.
According to a second aspect of the present invention, the image data composition apparatus of the first aspect further comprises: a transparency storage unit for storing at least two transparencies; a transparency selection unit for selecting one of the transparencies stored in the transparency storage unit, on the basis of the transparency data; and the composition unit for composing the color data in accordance with the transparency selected by the transparency selection unit. Since the transparency data is used only for selection by the transparency selection unit, the quantity of data can be reduced as compared with the case where the transparency having relatively large quantity of data is directly stored in the color table. Further, since different color codes having the same transparency are put together in the transparency storage unit, the entire storage area can be used with high efficiency.
According to a third aspect of the present invention, the image data composition apparatus of the first aspect further comprises: a transparency code storage unit for storing at least two transparency codes; a transparency code selection unit for selecting one of the transparency codes stored in the transparency code storage unit, on the basis of the transparency data; a transparency table in which plural transparency codes are associated with the corresponding transparencies, the transparency table receiving the transparency code selected by the transparency code selection unit, and outputting a transparency corresponding to this code; and the composition unit for composing the respective color data in accordance with the transparency output from the transparency table. Since each transparency code has only the quantity of data required for selecting the transparency, the number of input terminals of the transparency code selection unit and the number of signal lines inside the selection unit are reduced as compared with the case where the selection unit selects the transparency itself, whereby the circuit installed area can be used with higher efficiency.
According to a fourth aspect of the present invention, in the image data composition apparatus of the first aspect, the composition unit comprises: a first multiplier for accepting a coefficient specification signal which is composed of at least one bit decided by the transparency data, and specifying a first coefficient corresponding to the transparency of the color data of the first image data in accordance with the coefficient specification signal, and multiplying the color data of the first image data by this first coefficient; a second multiplier for accepting the coefficient specification signal, and specifying a second coefficient corresponding to the transparency of the color data of the second image data in accordance with the coefficient specification signal, and multiplying the color data of the second image data by this second coefficient; and an adder for adding the products output from the first multiplier and the second multiplier. Since composition of image data requires only selection of coefficient arithmetic, the circuit structure of the composition unit can be simplified as compared with the case where arithmetic is performed with transparency.
According to a fifth aspect of the present invention, the image data composition apparatus of the fourth aspect further comprises: a transparency code storage unit for storing at least two transparency codes each being composed of at least one bit; and a transparency code selection unit for selecting one of the transparency codes stored in the transparency code storage unit, on the basis of the transparency data. The transparency data is composed of at least one bit, and the coefficient specification signal is composed of the transparency data and the transparency code. Since different color codes having the same transparency are put together in the transparency storage unit, the entire storage area can be used with high efficiency as compared with the case where all of the bits constituting the coefficient specification signal as the transparency selection data are stored.
According to a sixth aspect of the present invention, the image data composition apparatus of the first aspect further comprises a buffer memory for storing data which is generated as the result of composition by the composition unit, and outputting this data as the second image data to the composition unit. Therefore, when composing plural frames of image data, the number of colors to be set as transparent colors can be increased regardless of the number of frames to be composed, without increasing the circuit scale and processing cycle.
According to a seventh aspect of the present invention, there is provided an image display apparatus including an image data composition apparatus according to any of the first to sixth aspects. Therefore, in the image display apparatus, the number of colors to be set as transparent colors can be increased without increasing the circuit scale and processing cycle.